var searchRange = function(nums, target) {
    let start = -1
    let end = -1
    let result = false
    for(let i=0;i<nums.length;i++){
        if(nums[i]==target){
            result = true
            start = i
            break;
        }
    }
    if(result==true){
        for(let j=start;j<nums.length;j++){
            if(nums[j]==target){
                end = j
            }
        }
    }
    return [start,end]
};